﻿@using System.Collections
@using Lavka.Models
@model IEnumerable<Lavka.Models.Caterories>


@{
    ViewBag.Title = "List";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="panel ui-corner-all">
<h2>Все товароы</h2>
<div>
    @Html.ActionLink("Все товароы", "List") 
</div>

<h2>Категории товаров</h2>
<table>

@foreach (var item in Model) 
{
    <tr>
        <td>
            @Html.ActionLink(item.Name, "Category", new { categoryId = item.CategoryId }) 
        </td>
    </tr>
}
</table>
<h2>Производители</h2>
<table>
@foreach (var item in (IEnumerable<Brands>)ViewData["Brands"]) 
{
    <tr>
        <td>
            @Html.ActionLink(item.Name, "Brand", new { brandId = item.BrandId }) 
        </td>
    </tr>
}
</table>
</div>
